package com.fubowen.reader.db.model

import android.view.View
import com.fubowen.reader.adapter.ISimple
import com.fubowen.reader.databinding.SuggestBinding

class Suggest(val name: String) : ISimple<Suggest> {
    override fun isSame(new: Suggest) = name == new.name
    override fun isSameOfContent(new: Suggest) = name == new.name
    override fun onBind(view: View, id: Int) {
        SuggestBinding.bind(view).name.text = name
    }

    companion object {
        @JvmStatic
        fun defaultValue() = listOf(
            Suggest("https://"),
            Suggest("http://"),
            Suggest("www."),
            Suggest("/"),
            Suggest("."),
            Suggest(".com"),
            Suggest(".cn"),
        )
    }
}